<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<title>$AKey - Macros</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
</head>

<body>

<h1>$AKey</h1>
<div class="navbar">
<a href="../../index.html">main</a> |
<a href="../index.html">Macros</a> |
<a href="index.html">Macro-language</a> |
<a href="cmds.html">Macro-commands</a>
</div>

<div class=shortdescr>
The <dfn>$AKey</dfn> macro-command inserts the name of the hotkey that was used to call the current macro.<br>
</div>

<pre class=syntax>
<dfn>$AKey</dfn>
</pre>

<h3>Arguments</h3>
<div class=descr>
None.
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>It is impossible to use macro-language elements while <a href="../macrokey/record.html">recording</a>
  a macro in a usual way. Macro-language elements can be added to the sequence only by editing
  the registry manually or by using special applications or FAR plugins.</li>
</ol>
</div>


<h3>Example</h3>
<div class=descr>
A macro for switching between screens. 10 similar AltNumber macros should be entered in the Common area:
<pre class="code">
$If ( Dialog || MainMenu || Menu || UserMenu || Search )
  $AKey
$Else
  %s = AKey ( 1 );
  %c = substr ( %s, len ( %s ) - 1, 1 );
  F12
  $If ( CheckHotkey ( %c ) )
    eval ( %c )
  $Else
    Esc
    $AKey
  $End
$End
</pre>
</div>

<div class=see>See also:</div><div class=seecont>
<a href="functions.html#akey">akey</a>,
<a href="../examples.html">Examples</a>
</div>


</body>

</html>
